﻿using System;
using System.Collections.Generic;
using ExpenseSystem.Common.BaseModel;


namespace ExpenseSystem.Model
{
    [TableName("SYS_MODULE")]
    public class ModuleModel : SystemModel
    {
        private string _code;
        private string _name;
        private string _appurl;
        private string _apiurl;
        private string _appclass;
        private bool _admin;
        private bool _main;
        private bool _desklink;
        private int _seq;
        private int _grp;
        public virtual string Code
        {
            get { return _code; }
            set
            {
                if (_code == value)
                    return;
                _code = value;
                if (!PropertyUpdated.Contains("Code"))
                    PropertyUpdated.Add("Code");
            }
        }

        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (_name == value)
                    return;
                _name = value;
                if (!PropertyUpdated.Contains("Name"))
                    PropertyUpdated.Add("Name");
            }
        }

        public virtual string AppUrl
        {
            get { return _appurl; }
            set
            {
                if (_appurl == value)
                    return;
                _appurl = value;
                if (!PropertyUpdated.Contains("AppUrl"))
                    PropertyUpdated.Add("AppUrl");
            }
        }
        public virtual string ApiUrl
        {
            get { return _apiurl; }
            set
            {
                if (_apiurl == value)
                    return;
                _apiurl = value;
                if (!PropertyUpdated.Contains("ApiUrl"))
                    PropertyUpdated.Add("ApiUrl");
            }
        }
        public virtual string AppClass
        {
            get { return _appclass; }
            set
            {
                if (_appclass == value)
                    return;
                _appclass = value;
                if (!PropertyUpdated.Contains("AppClass"))
                    PropertyUpdated.Add("AppClass");
            }
        }
        public virtual bool Admin
        {
            get { return _admin; }
            set
            {
                if (_admin == value)
                    return;
                _admin = value;
                if (!PropertyUpdated.Contains("Admin"))
                    PropertyUpdated.Add("Admin");
            }
        }
        public virtual bool Main
        {
            get { return _main; }
            set
            {
                if (_main == value)
                    return;
                _main = value;
                if (!PropertyUpdated.Contains("Main"))
                    PropertyUpdated.Add("Main");
            }
        }
        public virtual bool DeskLink
        {
            get { return _desklink; }
            set
            {
                if (_desklink == value)
                    return;
                _desklink = value;
                if (!PropertyUpdated.Contains("DeskLink"))
                    PropertyUpdated.Add("DeskLink");
            }
        }
        public virtual int Seq
        {
            get { return _seq; }
            set
            {
                if (_seq == value)
                    return;
                _seq = value;
                if (!PropertyUpdated.Contains("Seq"))
                    PropertyUpdated.Add("Seq");
            }
        }
        public virtual int Grp
        {
            get { return _grp; }
            set
            {
                if (_grp == value)
                    return;
                _grp = value;
                if (!PropertyUpdated.Contains("Grp"))
                    PropertyUpdated.Add("Grp");
            }
        }
    }
}
